﻿@model List<Lapkin.Models.DataModels.Category>
@{
    ViewBag.Title = "Index";
}

<h2>Good</h2>
@Html.Raw("a" + "a" + "a");

<ul>
    @foreach (var category in Model)
    {
        if (category.Parent == null)
        {
            <li>
                @category.Name
                @if (category.Childs != null)
                {
                    foreach (var child in category.Childs)
                    {
                        <ul>
                            <li>
                                @child.Name
                            </li>
                        </ul>
                    }
                }
            </li>
        }
    }
</ul>
